Functions: gtk_about_dialog_get/set_name() were deprecated in favour of
authorTristan Van Berkom <tvb@src.gnome.org>
Mon, 14 May 2007 18:33:53 +0000 (18:33 +0000)
committerTristan Van Berkom <tvb@src.gnome.org>
Mon, 14 May 2007 18:33:53 +0000 (18:33 +0000)
* gtk/gtkaboutdialog.c: Functions: gtk_about_dialog_get/set_name()
were deprecated in favour of gtk_about_dialog_get/set_program_name(),
the GtkAboutDialog now uses the "program-name" property instead of
the conflicting "name" property (fixes bug 345822).

svn path=/trunk/; revision=17845

ChangeLog
README.in
gtk/gtkaboutdialog.c
gtk/gtkaboutdialog.h

index 06c4eddf4b97708c7388f2bdfa9ede283ff3da77..c462e023edc2023d3633bd7d9e09037785816c19 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-05-14  Tristan Van Berkom  <tvb@gnome.org>
+
+       * gtk/gtkaboutdialog.c: Functions: gtk_about_dialog_get/set_name() 
+       were deprecated in favour of gtk_about_dialog_get/set_program_name(), 
+       the GtkAboutDialog now uses the "program-name" property instead of 
+       the conflicting "name" property (fixes bug 345822).
+
 2007-05-14  Emmanuele Bassi  <ebassi@gnome.org>
 
        * configure.in: Add check for GNU extensions to ftw()/nftw().
index 18b581567e8919cd4c812cdc03f403e21a1428dc..cf6b373bcf8ac45c76d276aae9be0b05ac211670 100644 (file)
--- a/README.in
+++ b/README.in
@@ -27,6 +27,13 @@ Installation
 See the file 'INSTALL'
 
 
+Release notes for 2.12
+======================
+
+* Functions: gtk_about_dialog_get/set_name() were deprecated in favour of
+  gtk_about_dialog_get/set_program_name(), the GtkAboutDialog now uses the
+  "program-name" property instead of the conflicting "name" property.
+
 Release notes for 2.10
 ======================
 
index 6d64f6de0e05012bbc833ffa8a5fb8031a8e75ca..cd63f5b74a157cb6259951471c9ae1010af42378 100644 (file)
@@ -193,7 +193,7 @@ gtk_about_dialog_class_init (GtkAboutDialogClass *klass)
    */  
   g_object_class_install_property (object_class,
                                   PROP_NAME,
-                                  g_param_spec_string ("name",
+                                  g_param_spec_string ("program-name",
                                                        P_("Program name"),
                                                        P_("The name of the program. If this is not set, it defaults to g_get_application_name()"),
                                                        NULL,
@@ -528,7 +528,7 @@ gtk_about_dialog_init (GtkAboutDialog *about)
   gtk_widget_grab_focus (close_button);
 
   /* force defaults */
-  gtk_about_dialog_set_name (about, NULL);
+  gtk_about_dialog_set_program_name (about, NULL);
   gtk_about_dialog_set_logo (about, NULL);
 }
 
@@ -572,7 +572,7 @@ gtk_about_dialog_set_property (GObject      *object,
   switch (prop_id) 
     {
     case PROP_NAME:
-      gtk_about_dialog_set_name (about, g_value_get_string (value));
+      gtk_about_dialog_set_program_name (about, g_value_get_string (value));
       break;
     case PROP_VERSION:
       gtk_about_dialog_set_version (about, g_value_get_string (value));
@@ -699,9 +699,28 @@ gtk_about_dialog_get_property (GObject    *object,
  *  dialog and must not be modified.
  *
  * Since: 2.6
+ *
+ * @Deprecated: 2.12: Use gtk_about_dialog_get_program_name() instead.
  **/
 G_CONST_RETURN gchar *
 gtk_about_dialog_get_name (GtkAboutDialog *about)
+{
+  return gtk_about_dialog_get_program_name (about);
+}
+
+/**
+ * gtk_about_dialog_get_program_name:
+ * @about: a #GtkAboutDialog
+ * 
+ * Returns the program name displayed in the about dialog.
+ * 
+ * Return value: The program name. The string is owned by the about
+ *  dialog and must not be modified.
+ *
+ * Since: 2.12
+ **/
+G_CONST_RETURN gchar *
+gtk_about_dialog_get_program_name (GtkAboutDialog *about)
 {
   GtkAboutDialogPrivate *priv;
   
@@ -745,10 +764,29 @@ update_name_version (GtkAboutDialog *about)
  * If this is not set, it defaults to g_get_application_name().
  * 
  * Since: 2.6
+ *
+ * @Deprecated: 2.12: Use gtk_about_dialog_set_program_name() instead.
  **/
 void
 gtk_about_dialog_set_name (GtkAboutDialog *about, 
                           const gchar    *name)
+{
+    gtk_about_dialog_set_program_name (about, name);
+}
+
+/**
+ * gtk_about_dialog_set_program_name:
+ * @about: a #GtkAboutDialog
+ * @name: the program name
+ *
+ * Sets the name to display in the about dialog. 
+ * If this is not set, it defaults to g_get_application_name().
+ * 
+ * Since: 2.12
+ **/
+void
+gtk_about_dialog_set_program_name (GtkAboutDialog *about, 
+                                   const gchar    *name)
 {
   GtkAboutDialogPrivate *priv;
   gchar *tmp;
@@ -762,9 +800,10 @@ gtk_about_dialog_set_name (GtkAboutDialog *about,
 
   update_name_version (about);
 
-  g_object_notify (G_OBJECT (about), "name");
+  g_object_notify (G_OBJECT (about), "program-name");
 }
 
+
 /**
  * gtk_about_dialog_get_version:
  * @about: a #GtkAboutDialog
index f9337e6095ea110f3660100acd632d6bade46e73..29555b8d342580fa55bbb4fb0f8f47e32ddaf5f5 100644 (file)
@@ -64,9 +64,14 @@ void                   gtk_show_about_dialog                   (GtkWindow
                                                                const gchar     *first_property_name,
                                                                ...) G_GNUC_NULL_TERMINATED;
 
+#ifndef GTK_DISABLE_DEPRECATED
 G_CONST_RETURN gchar  *gtk_about_dialog_get_name               (GtkAboutDialog  *about);
 void                   gtk_about_dialog_set_name               (GtkAboutDialog  *about,
                                                                const gchar     *name);
+#endif /* GTK_DISABLE_DEPRECATED */
+G_CONST_RETURN gchar  *gtk_about_dialog_get_program_name       (GtkAboutDialog  *about);
+void                   gtk_about_dialog_set_program_name       (GtkAboutDialog  *about,
+                                                               const gchar     *name);
 G_CONST_RETURN gchar  *gtk_about_dialog_get_version            (GtkAboutDialog  *about);
 void                   gtk_about_dialog_set_version            (GtkAboutDialog  *about,
                                                                const gchar     *version);